import request from '@/utils/request'

// 查询党员信息列表(有权限控制)
export function listMember(query) {
  return request({
    url: '/partybuilding/Member/list',
    method: 'get',
    params: query
  })
}
// 查询党员信息列表(无权限控制)
export function listAllMember(query) {
  return request({
    url: '/partybuilding/Member/memberList',
    method: 'get',
    params: query
  })
}
// 查询党员信息详细
export function getMember(id) {
  return request({
    url: '/partybuilding/Member/' + id,
    method: 'get'
  })
}

// 判断用户名是否存在
export function checkInfo(query) {
  return request({
    url: '/partybuilding/Member/checkInfo',
    method: 'get',
    params: query
  })
}

// 新增党员信息
export function addMember(data) {
  return request({
    url: '/partybuilding/Member/add',
    method: 'post',
    data: data
  })
}

// 修改党员信息
export function updateMember(data) {
  return request({
    url: '/partybuilding/Member/edit',
    method: 'post',
    data: data
  })
}

// 删除党员信息
export function delMember(id) {
  return request({
    url: '/partybuilding/Member/remove/' + id,
    method: 'post'
  })
}


// 修改党员信息履历
export function editResume(data) {
  return request({
    url: '/partybuilding/Member/editResume',
    method: 'post',
    data: data
  })
}